﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">
<script language="javascript" src="<%=this.Url.Content("~/Home/ApplicationTeam") %>"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContainerPlaceHolder" runat="server">
    <div class="title ">
        <span id="AppName">所有应用系统</span>
    </div>
    <div class="block_route_type" id="dv_routeTYpe">
        <div>
            <div id="block_vehicle">
                <a>全部展开</a>&nbsp;&nbsp;<a>全部关闭</a>
            </div>
        </div>
        <div class="block_route_section">
            <div  id="tree">
                
            </div>
        </div>
    </div>
    <div style="width: 650px; float: right;" id="dv_appInfo">
       
    </div>
    <div class="clear">
    </div>
    <script type="text/javascript">
        var appUrl = '<%=this.Url.Content("~/Application/Index") %>';
        var d = new dTree('d');
        displayLoading = true;
        d.add(0, -1, '按组显示服务器');
        $("document").ready(function() {
            //生成树
            if (typeof (TreeObj) != 'undefined' && TreeObj) {
                $.each(TreeObj, function(n, o) {
                    d.add(o.OrderID, o.ParentID, o.Name, 'javascript:;',o.ID);
                    $.each(o.Nodes, function(n2, o2) {
                    d.add(o2.OrderID, o2.ParentID, o2.Name, 'javascript:;', o2.ID);
                    });
                })
                $("#tree").html(d.toString());
            }
        });
        function onTreeClick(id,name) {
            
            $("#dv_appInfo").load(appUrl, { appId:id }, function() {
                $("#AppName").html(name);
            });
        }
		</script>
</asp:Content>
